package cn.cuilan.common.server;

import cn.cuilan.common.core.ConnectorConfiguration;

/**
 * 服务端配置信息类
 *
 * @author zhang.yan
 */
public class ServerConfiguration extends ConnectorConfiguration {

    public ServerConfiguration() {
        this(newBuilder());
    }

    public ServerConfiguration(ServerBuilder serverBuilder) {
        super(serverBuilder);
    }

    public static ServerConfiguration getDefault() {
        return newBuilder().build();
    }

    public static ServerBuilder newBuilder() {
        return new ServerBuilder();
    }

    public static class ServerBuilder extends ConnectorConfiguration.Builder<ServerBuilder> {
        public ServerConfiguration build() {
            return new ServerConfiguration(this);
        }
    }
}
